<div class="container-fluid">
    <div class="row ikg-row">
        <div class="col-lg-3 ikg-col">
            <div id="treeBar" class="panel panel-default ikg-panel ikg-page-panel">
                <div class="panel-heading">
                    <h3 class="panel-title ikg-panel-title">
                        <i class="fa fa-outdent" aria-hidden="true"></i> 组织机构树
                    </h3>
                </div>
                <div class="panel-body ikg-panel-body">
                    <div data-bind="jsTreeView:treeViewModel">
                    </div>
                </div>
            </div>
        </div>
        <div class="col-lg-9 ikg-col">
            <div class="row ikg-row">
                <div class="col-sm-12 ikg-col">
                    <div class="panel panel-default ikg-panel">
                        <div class="panel-body">
                            <div class="col-lg-4">
                                <div class="input-group">
                                    <label class="input-group-addon ikg-font-12">用户名:</label>
                                    <input type="text" class="form-control ikg-font-12" id="name">
                                </div>
                            </div>
                            <div class="col-lg-4">
                                <button type="button" id="btn_query" class="btn btn-success btn-sm"
                                        data-bind="click:fnSearch">
                                    <i class="fa fa-search fa-lg"></i><span class="hidden-xs hidden-sm"> 查询</span>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row ikg-row">
                <div class="col-sm-12 ikg-col">
                    <div id="toolbar" class="btn-group">
                        <button type="button" class="btn btn-success btn-sm" data-bind="click:fnAdd">
                            <i class="fa fa-plus fa-lg" aria-hidden="true"></i><span
                                class="hidden-sm hidden-xs"> 新增</span>
                        </button>
                        <button type="button" class="btn btn-success btn-sm" data-bind="click:fnRemove">
                            <i class="fa fa-trash fa-lg" aria-hidden="true"></i><span
                                class="hidden-sm hidden-xs"> 删除</span>
                        </button>
                        <button type="button" class="btn btn-success btn-sm" data-bind="click:fnEdit">
                            <i class="fa fa-pencil-square-o fa-lg" aria-hidden="true"></i><span
                                class="hidden-sm hidden-xs"> 编辑</span>
                        </button>
                        <button type="button" class="btn btn-success btn-sm" data-bind="click:fnView">
                            <i class="fa fa-file-text fa-lg" aria-hidden="true"></i><span class="hidden-sm hidden-xs"> 查看</span>
                        </button>
                    </div>
                </div>
            </div>
            <div class="row ikg-row">
                <div class="col-sm-12 ikg-col">
                    <table data-bind="tableView:tableViewModel"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<div id="userDialog" class="modal hide" tabindex="-1" role="dialog"
     data-bind="template:{name:'userModalTemplate',data:userViewModel},ikgModal:{ backdrop: 'static', keyboard: false, show: modalVisible }"></div>

<script type="text/html" id="userModalTemplate">
    <div class="modal-dialog" style="width: 400px" role="document">
        <div class="modal-content">
            <div class="modal-header ikg-modal-header" id="modalHeader">
                <button type="button" class="close ikg-close" data-bind="click: close">&times;</button>
                <span class="modal-title ikg-modal-title" data-bind="text:title"></span>
            </div>
            <!-- body -->
            <div class="modal-body">
                <form class="form-horizontal" id="detailForm" autocomplete="off">
                    <div class="form-group">
                        <label for="userName" class="col-sm-3 control-label">用户名</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control ikg-font-12" name="userName" id="userName"
                                   placeholder="*必填，用于系统登录"
                                   data-bind="value:userName">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">显示名称</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control ikg-font-12" name="nickName" placeholder="*必填，用于系统显示"
                                   data-bind="value:nickName">
                        </div>
                    </div>
                    <div class="form-group" data-bind="visible:visibled">
                        <label class="col-sm-3 control-label">密码</label>
                        <div class="col-sm-8">
                            <input type="password" class="form-control ikg-font-12" name="userPwd" placeholder="*必填"
                                   data-bind="value:userPwd">
                        </div>
                    </div>
                    <!-- 默认基本信息 -->
                    <div style="display: none">
                        <input type="text" data-bind="value:userId">
                        <input type="text" data-bind="value:editStatus">
                        <input type="text" data-bind="value:recordStatus">
                        <input type="text" data-bind="value:orgId">
                    </div>
                </form>
            </div>
            <div class="modal-footer" id="modalFooter">
                <button type="button" class="btn btn-success ikg-btn-12" data-bind="click:save,visible:enabled">
                    <i class="fa fa-save"></i> 保存
                </button>
                <button type="button" class="btn btn-default ikg-btn-12" data-bind="click:close">
                    <i class="fa fa-close"></i> 关闭
                </button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
</script>